package co.edu.uniquindio.ingesis.Logica;

class ListNode< T >
{
	// package access members; List can access these directly
	T data; // data for this node
	ListNode< T > nextNode; // reference to the next node in the list

	// constructor creates a ListNode that refers to object
	ListNode( T object )
	{
		this( object, null );
	} // end ListNode one-argument constructor

	// constructor creates ListNode that refers to the specified
	// object and to the next ListNode
	ListNode( T object, ListNode< T > node )
	{
		data = object;
		nextNode = node;
	} // end ListNode two-argument constructor
	// return reference to data in node
	T getData()
	{
		return data; // return item in this node
	} // end method getData

	// return reference to next node in list
	ListNode< T > getNext()
	{
		return nextNode; // get next node
	} // end method getNext
} // end class ListNode< T >